package com.woniu.springbootrbac.mapper;

import com.woniu.springbootrbac.dto.RoleDto;
import com.woniu.springbootrbac.entity.SysRole;

import java.util.List;

/**
* @author donghang
* @description 针对表【sys_role】的数据库操作Mapper
* @createDate 2022-11-30 17:04:58
* @Entity com.woniu.springbootrbac.entity.SysRole
*/
public interface SysRoleMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysRole record);

    int insertSelective(SysRole record);

    SysRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysRole record);

    int updateByPrimaryKey(SysRole record);

    List<SysRole> selAll();

    List<Integer> selectRolesIdByUid(Long uid);

    int insertRole(RoleDto roleDto);
    /**
     * @Description 插入之前先删除当前用户的角色
     * @param uid
     * @Return int
     * @Author  fengSir
     * @Date    Create by 2022-11-30 10:47
     */
    int deleteByUid(Long uid);

}
